import { exInputNumber, exSwitch, exInput, exSelect } from '@ve/common/components/extension'

export default {
  VERSION: '20220408',
  type: 'uiTitleCard',
  name: '主题盒子',
  icon: 'checkbox-blank-line',
  svg: 'zhuti',
  //数据别名
  // dataName: 'uiFlexbox_data',
  //扩展
  data: {
    formData: {
      value: '',
    },
  },
  extension: {
    isDesign: exSwitch('是否自定义内容', true),
    requestSet: {
      type: 'exRequestSet',
      name: '接口配置',
      value: {
        api: '/wms/wms-web',
        method: 'wms.screen.query.test',
        getDataKey: 'wms.screen.query.test',
        cardValue: 'EDITWHO',
        isCard: true,
        loopRequest: false,
        loopTime: 3000,
        nameKey: '',
        valueKey: '',
        busList: [],
        dataObj: {},
        data: [
          { key: '#LIMIT#', value: '1' },
          { key: '#PAGE_SIZE#', value: '10' },
        ],
        resList: [],
      },
    },
    data: {
      formData: {
        value: '',
      },
    },
    boxHeight: exInputNumber('高度', 50, 1, 500),
    flexDer: exSelect('子组件排布方向', 'row', [
      {
        label: '横',
        value: 'row',
      },
      {
        label: '竖',
        value: 'col',
      },
    ]),
    padding: {
      type: 'exInputNumber',
      name: '内边距',
      value: 1,
      min: 0,
      max: 12,
    },
    justifyAlign: {
      type: 'exRadioGroup',
      name: '水平位置',
      value: 'center',
      list: [
        {
          label: '居左',
          value: 'start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居右',
          value: 'end',
        },
      ],
    },
    itemsAlign: {
      type: 'exRadioGroup',
      name: '垂直方向',
      value: 'center',
      list: [
        {
          label: '居上',
          value: 'flex-start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居下',
          value: 'flex-end',
        },
      ],
    },
    topMargin: {
      type: 'exInputNumber',
      name: '上外边距',
      value: 0,
    },
    rightMargin: {
      type: 'exInputNumber',
      name: '右外边距',
      value: 0,
    },
    bottomMargin: {
      type: 'exInputNumber',
      name: '下外边距',
      value: 0,
    },
    leftMargin: {
      type: 'exInputNumber',
      name: '左外边距',
      value: 0,
    },
    isMarquee: exSwitch('跑马灯模式', false),
    marqueeTime: exInputNumber('跑马灯时长', 4, 1, 100),
    showBrage: exSwitch('显示角标', true),
    brageWidth: exInputNumber('角标线宽', 15, 1, 500),
    brageLine: exInputNumber('角标线长', 15, 1, 500),
    brageRotate: exInputNumber('角标圆角', 0, 0, 500),
    brageColorLeftTop: {
      type: 'exSetChartColor',
      name: '角标颜色-左上',
      value: '#9271D5',
    },
    brageColorLeftBottom: {
      type: 'exSetChartColor',
      name: '角标颜色-左下',
      value: '#9271D5',
    },
    brageColorRightBottom: {
      type: 'exSetChartColor',
      name: '角标颜色-右下',
      value: '#9271D5',
    },
    brageColorRightTop: {
      type: 'exSetChartColor',
      name: '角标颜色-右上',
      value: '#9271D5',
    },
    backgroundColor: {
      type: 'exSetChartColor',
      name: '背景颜色',
      value: '#fff',
    },
    title: exInput('主题内容', '测试主题'),
    formatte: exInput('格式化', '${value}'),
    letterSpacing: exInputNumber('间距', 0, 0, 500),
    titleBgColor: {
      type: 'exSetChartColor',
      name: '主题背景',
      value: '#D7CBEE',
    },
    titleRadius: {
      type: 'exInputNumber',
      name: '主题圆角',
      value: 0,
    },
    titleTopMargin: {
      type: 'exInputNumber',
      name: '主题上外边距',
      value: 0,
    },
    titleRightMargin: {
      type: 'exInputNumber',
      name: '主题右外边距',
      value: 0,
    },
    titleBottomMargin: {
      type: 'exInputNumber',
      name: '主题下外边距',
      value: 0,
    },
    titleLeftMargin: {
      type: 'exInputNumber',
      name: '主题左外边距',
      value: 0,
    },
    titleTopPadding: {
      type: 'exInputNumber',
      name: '主题上内边距',
      value: 5,
    },
    titleRightPadding: {
      type: 'exInputNumber',
      name: '主题右内边距',
      value: 0,
    },
    titleBottomPadding: {
      type: 'exInputNumber',
      name: '主题下内边距',
      value: 5,
    },
    titleLeftPadding: {
      type: 'exInputNumber',
      name: '主题左内边距',
      value: 7,
    },
    titleFontSize: {
      type: 'exInputNumber',
      name: '主题字体大小',
      value: 12,
    },
    titleColor: {
      type: 'exSetChartColor',
      name: '主题字体颜色',
      value: '#fff',
    },
    titleFontWeight: exSelect('字体粗细', 500, [
      {
        label: '正常',
        value: 500,
      },
      {
        label: '加粗',
        value: 600,
      },
      {
        label: '特粗',
        value: 700,
      },
    ]),
    backgroundImg: {
      type: 'exUpload',
      name: '背景图片',
      value: '',
    },
    backgroundSize: exInput('图片大小', 'cover'),
  },
  list: [],
  interaction: [],
}
